package com.ltedu.auth.factory;

import com.ltedu.auth.client.AuthClient;
import com.ltedu.common.dto.UserDTO;
import com.ltedu.common.vo.Result;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @className: AuthClientFallbackFactory
 * @auther: Jerry
 * @date: 2020/12/15 10:06
 * @desctiption: TODO
 * @version: 1.0
 */
@Component
public class AuthClientFallbackFactory implements FallbackFactory<AuthClient> {
    @Override
    public AuthClient create(Throwable throwable) {
        return new AuthClient() {
            @Override
            public Result info(String username) {
                return Result.ok();
            }
        };
    }
}
